/* 页面容器样式 */
.pageContainer {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background-color: var(--dark);
    background-image:
            radial-gradient(circle at 25% 25%, rgba(22, 93, 255, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 75% 75%, rgba(114, 46, 209, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
}

/* 注册卡片样式 */
.registerCard {
    background: var(--dark);
    border-radius: 1rem;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

/* 卡片头部样式 */
.cardHeader {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

/* 表单容器样式 */
.formContainer {
    padding: 2rem;
}

/* 表单组样式 */
.formGroup {
    margin-bottom: 1.25rem;
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.input {
    width: 100%;
    padding: 0.875rem;
    background: var(--darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--light);
    transition: border-color 0.3s ease;
    font-size: 1rem;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
}

/* 验证码输入区域样式 */
.codeInputContainer {
    display: flex;
    gap: 0.5rem;
}

.codeInput {
    flex: 1;
}

.getCodeBtn {
    padding: 0 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.getCodeBtn:disabled {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    cursor: not-allowed;
}

.getCodeBtn:not(:disabled):hover {
    background-color: rgba(22, 93, 255, 0.2);
}

/* 密码强度容器样式 */
.passwordStrengthContainer {
    margin-top: 0.5rem;
}

/* 密码强度进度条容器 */
.strengthBarContainer {
    height: 4px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

/* 密码强度进度条 */
.strengthBar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* 不同强度对应的进度条颜色 */
.strengthLow {
    background-color: #ff4d4f;
}

.strengthMedium {
    background-color: #faad14;
}

.strengthHigh {
    background-color: #52c41a;
}

/* 密码强度文本提示 */
.strengthText {
    font-size: 0.8rem;
    color: var(--muted);
}

/* 密码输入容器（包含显示/隐藏按钮） */
.passwordInputContainer {
    position: relative;
}

/* 密码显示/隐藏按钮 */
.togglePasswordBtn {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.25rem;
}

.togglePasswordBtn:hover {
    color: var(--primary);
}

/* 服务条款同意选项样式 */
.termsItem {
    margin: 1rem 0 1.5rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.termsItem:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.termsLabel {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--muted);
}

/* 复选框样式美化 */
.checkbox {
    margin-top: 0.25rem;
    width: 16px;
    height: 16px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox:checked::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox:hover:not(:checked) {
    border-color: var(--primary);
}

/* 链接样式 */
.link {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    padding: 0 2px;
}

.link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.link:hover {
    color: #4080ff;
}

.link:hover::after {
    width: 100%;
}

/* 注册按钮样式 */
.registerBtn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.2);
}

.registerBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 93, 255, 0.3);
}

.registerBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 登录跳转链接样式 */
.loginRedirect {
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
}

/* 返回登录按钮样式 */
.backToLoginBtn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    text-decoration: none;
}

.backToLoginBtn:hover {
    color: #4080ff;
    text-decoration: underline;
}

/* 动画定义 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 错误提示样式 */
.errorMessage {
    color: #ff4d4f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .termsLabel {
        flex-direction: column;
        align-items: flex-start;
    }

    .checkbox {
        margin-top: 0;
    }

    .cardHeader, .formContainer {
        padding: 1.5rem 1rem;
    }
}